package com.ncr.travel.appmgr.client.presenter;

import com.google.inject.Inject;
import com.google.inject.Provider;
import com.ncr.travel.appmgr.client.model.ScreenConfigurationFactory;
import com.ncr.travel.appmgr.client.mvp.EventBus;
import com.ncr.travel.appmgr.client.service.AppManagerWebService;
import com.ncr.travel.appmgr.client.view.CategoryAndScreenView;

public class CategoryAndScreenPresenterProvider implements Provider<CategoryAndScreenPresenterImpl> {
	private final AppManagerWebService webService;
	private final EventBus eventBus;
	private final CategoryAndScreenView categoryAndScreenView;
	private final RulePresenter rulePresenter;
	private final TextPresenter textPresenter;
	private final FunctionPresenter functionPresenter;
	private final GraphicsEditorPresenter graphicsEditorPresenter;
    /**
     * Factory for screen config model objects.
     */
	private final ScreenConfigurationFactory screenConfigurationFactory;

	@Inject
	public CategoryAndScreenPresenterProvider(AppManagerWebService webService, ScreenConfigurationFactory screenConfigurationFactory, EventBus eventBus, CategoryAndScreenView categoryAndScreenView, RulePresenter rulePresenter, TextPresenter textPresenter,
			FunctionPresenter functionPresenter, GraphicsEditorPresenter graphicsEditorPresenter) {
		super();
		System.out.println("Constructing CategoryAndScreenPresenterProvider");
		this.webService = webService;
		this.screenConfigurationFactory = screenConfigurationFactory;
		this.eventBus = eventBus;
		this.categoryAndScreenView = categoryAndScreenView;
		this.rulePresenter = rulePresenter;
		this.textPresenter = textPresenter;
		this.functionPresenter = functionPresenter;
		this.graphicsEditorPresenter = graphicsEditorPresenter;
	}

	@Override
	public CategoryAndScreenPresenterImpl get() {
		CategoryAndScreenPresenterImpl categoryAndScreenPresenter = new CategoryAndScreenPresenterImpl(eventBus, screenConfigurationFactory, categoryAndScreenView, webService, rulePresenter, textPresenter, functionPresenter,
				graphicsEditorPresenter);
		return categoryAndScreenPresenter;
	}

}
